<?php

class Output {
	
	function __construct($domainName, $resDomains) {
		$this->_domainName = $domainName;
		$this->_resDomains = implode("\r", $resDomains);
		$this->i = 0;
		var_dump($resDomains);
	}
	
	public function toFile($filename = null)
	{
		$path = './result/';
		$filename = empty($filename)?$this->_domainName.'_'.date('Y-m-d').'_novalid':$filename;
		file_put_contents($path.$filename.'.txt', $this->_resDomains);
	}
}

?>